package com.forenow.demo6;

import java.util.ArrayList;
import java.util.List;

public class Test {
    public void m1(A a){ //AImpl
        a.eat();
    }
    public A m2(){
        A a = new AImpl();
        return a;
    }
    public void m3(List a){
        a.size();
    }
    public static void main(String[] args) {
        Test test = new Test();
        A a=new AImpl();
        test.m1(a);
        List list = new ArrayList();
        test.m3(list);
        A b=test.m2();
        b.eat();
    }
}
